/*
 * ============================================================================
 * Copyright Notice!
 * ----------------------------------------------------------------------------
 * This file contains proprietary and confidential information belonging to the
 * group of people involvled in developing this project.  Reproduction, disclosure 
 * or use without specific written authorization from project stake holders is 
 * prohibited. Please refer the readme.txt in project installation folder for more
 * specific contacts
 *
 * All rights reserved.
 * ============================================================================
 */
package edu.uwm.universitydb.framework.db.command;

import java.sql.PreparedStatement;
import java.sql.SQLException;

/**
 * Interface defining the contract for executing a query against data base
 * Classes implementing this interface is supposed to be state less.
 * 
 * @author Shyam Nair
 */
public interface DBCommand<T>
{
    /**
     * <code>getSQL(...)</code>
     * 
     * Implementation of this method is responsible for returning the actual query
     * that is supposed to be executed.
     * 
     * @return
     */
    String getSQL();
    
    /**
     * <code>setParameters(...)</code>
     *  
     *  Method responsible for setting the parameter values to SQL statement
     * 
     * @param pStmt
     */
    void setParameters(final PreparedStatement pStmt) throws SQLException;
}
/*
 * ============================================================================
 * Change History
 * ----------------------------------------------------------------------------
 * Apr 6, 2014   Shyam Nair
 * File created
 * ----------------------------------------------------------------------------
 */